#include <stdio.h>
struct data
{
    unsigned int temp:8;
    unsigned int shidu:8;


    unsigned char door1:1;
    unsigned char door2:1;
    unsigned char door3:1;
    unsigned char door4:1;

    unsigned char light1:1;
    unsigned char light2:1;
    unsigned char light3:1;
    unsigned char light4:1;

    unsigned char reserve:8;

};
int main(void)
{
    struct data D;
    printf("%zu\n",sizeof(D));
    scanf("%x",(unsigned*)&D);


    printf("温度：%d\n",D.temp);
    printf("湿度：%d\n",D.shidu);
    printf("门1:%s\t",D.door1 ? "开":"关");
    printf("门2:%s\t",D.door2 ? "开":"关");
    printf("门3:%s\t",D.door3 ? "开":"关");
    printf("门4:%s\t",D.door4 ? "开":"关");
    printf("\n");
   printf("灯1：%s\t",D.light1 ? "开":"关");
    printf("灯2：%s\t",D.light2 ? "开":"关");
    printf("灯3：%s\t",D.light3 ? "开":"关");
    printf("灯4：%s\t",D.light4 ? "开":"关");
    return 0;
}